<?php
/**
 * Created by PhpStorm.
 * User: david
 * Date: 3/21/19
 * Time: 10:09 PM
 */

namespace App\Transformers;


use App\Models\Department;
use League\Fractal\TransformerAbstract;

class DepartmentTransformer extends TransformerAbstract
{
    public function transform(Department $department)
    {
        return [
            'id' => $department->id,
            'name' => $department->name,
            'principal' => $department->principal,
            'tel' => $department->tel,
            'tel_sub' => $department->tel_sub,
            'email' => $department->email,
        ];
    }
}